package com.wenhai.spring.aop.features;

import com.wenhai.spring.aop.features.service.EchoService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * {@link org.springframework.aop.framework.ProxyFactoryBean} 示例
 *
 * @author wenhai
 * @date   2021/4/28
 */
public class ProxyFactoryBeanDemo {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("META-INF/spring-aop-context.xml");
        EchoService echoService = context.getBean("echoProxyFactoryBean", EchoService.class);
        System.out.println(echoService.echo("Hello,World"));
        context.close();

    }
}
